package com.zj.osm.model.pojo;

import android.os.Parcel;
import android.os.Parcelable;

public class ModuleType implements Parcelable {
    private String moduleTypeID;//id
    private String name;//名称
    private String moduleTypeKey;//设备key
    private String parentKey;//父级key
    private String moduleCode;//设备编号
    private String ico;

    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public ModuleType() {
    }

    public ModuleType(String moduleTypeID, String name, String moduleTypeKey, String parentKey, String moduleCode) {
        this.moduleTypeID = moduleTypeID;
        this.name = name;
        this.moduleTypeKey = moduleTypeKey;
        this.parentKey = parentKey;
        this.moduleCode = moduleCode;
    }

    public String getModuleTypeID() {
        return moduleTypeID;
    }

    public void setModuleTypeID(String moduleTypeID) {
        this.moduleTypeID = moduleTypeID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getModuleTypeKey() {
        return moduleTypeKey;
    }

    public void setModuleTypeKey(String moduleTypeKey) {
        this.moduleTypeKey = moduleTypeKey;
    }

    public String getParentKey() {
        return parentKey;
    }

    public void setParentKey(String parentKey) {
        this.parentKey = parentKey;
    }

    public String getModuleCode() {
        return moduleCode;
    }

    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }

    @Override
    public String toString() {
        return name;
    }


    public String toStrings() {
        return "ModuleType{" +
                "moduleTypeID='" + moduleTypeID + '\'' +
                ", name='" + name + '\'' +
                ", moduleTypeKey='" + moduleTypeKey + '\'' +
                ", parentKey='" + parentKey + '\'' +
                ", moduleCode='" + moduleCode + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.moduleTypeID);
        dest.writeString(this.name);
        dest.writeString(this.moduleTypeKey);
        dest.writeString(this.parentKey);
        dest.writeString(this.moduleCode);
        dest.writeString(this.ico);
    }

    protected ModuleType(Parcel in) {
        this.moduleTypeID = in.readString();
        this.name = in.readString();
        this.moduleTypeKey = in.readString();
        this.parentKey = in.readString();
        this.moduleCode = in.readString();
        this.ico = in.readString();
    }

    public static final Parcelable.Creator<ModuleType> CREATOR = new Parcelable.Creator<ModuleType>() {
        @Override
        public ModuleType createFromParcel(Parcel source) {
            return new ModuleType(source);
        }

        @Override
        public ModuleType[] newArray(int size) {
            return new ModuleType[size];
        }
    };
}
